import request from "@/utils/request";

// 添加代理
export function addAgent(data) {
  return request({
    url: "/backAdmin/merchantAgentApi/add",
    method: "post",
    data: data,
  });
}

// 删除代理
export function deleteAgent(merchantAgentIdList) {
  return request({
    url: `/backAdmin/merchantAgentApi/delete?merchantAgentIdList=${merchantAgentIdList}`,
    method: "post",
  });
}

// 获取代理列表
export function getAgentList(query) {
  return request({
    url: "/backAdmin/merchantAgentApi/list",
    method: "get",
    params: query,
  });
}

// 修改代理
export function updateAgent(data) {
  return request({
    url: "/backAdmin/merchantAgentApi/update",
    method: "post",
    data: data,
  });
}
